package commandPattern;

/**
 * receiver
 */
public class SeniorChef implements Command{

    private Order order;
    // 执行接收者方法
    public void makeFood(String name, int num){
        System.out.println(num + "份" + name);
    }

    @Override
    public void execute(Order order) {
        System.out.println(order.getDingTable() + "桌订单：");
        for (String s : order.getFoodDir().keySet()) {
            this.makeFood(s, order.getFoodDir().get(s));
        }
    }
}
